#include <ctype.h>
#include <limits.h>
#include <math.h>
#include <stdbool.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>

bool isPalindrome(char* s);

int main()
{
	return 0;
}

bool isPalindrome(char* s)
{
	int len = strlen(s);
	int left = 0, right = len - 1;
	while (left <= right) {
		while (left < len && !isalnum(s[left]))
			left++;
		while (right >= 0 && !isalnum(s[right]))
			right--;
		if (left > right)
			break;
		char chL = isupper(s[left]) ? s[left] + 32 : s[left],
			 chR = isupper(s[right]) ? s[right] + 32 : s[right];
		if (chL != chR)
			return false;
		left++; right--;
	}

	return true;
}
